package com.itheima.io;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;

/**
 * @author Anomaly
 * @date 2023/2/9 17:54
 */
public class FileReaderDemo2 {
    public static void main(String[] args) throws IOException {
        Reader r = new FileReader("file-io/src/test.txt");
        char[] buffer = new char[10];
        int len;
        while ((len = r.read(buffer)) != -1) {
            System.out.print(new String(buffer, 0, len));
        }
    }
}
